package model

import (
	"gorm.io/gorm"
)

type RoleFillAble struct {
	Name      string `json:"name" gorm:"comment:名称"`
	Alias     string `json:"alias" gorm:"comment:别名"`
	Status    int    `json:"status" gorm:"comment:状态：0禁用，1启用"`
	Desc      string `json:"desc" gorm:"comment:描述"`
	CreatedBy uint   `json:"created_by" gorm:"comment:创建人"`
	UpdatedBy uint   `json:"updated_by" gorm:"comment:更新操作人"`
	CompanyId uint   `json:"company_id" gorm:"comment:所属组织"`
}

type ShopIds []uint

type Role struct {
	gorm.Model
	Menus []Menu `json:"menus" gorm:"many2many:role_menus"`
	RoleFillAble
}

type RoleWithChecked struct {
	Role
	Checked bool `json:"checked"`
}

type RoleWithAntMenus struct {
	gorm.Model
	Menus []Menu `json:"menus" gorm:"many2many:role_menus"`
}
